import request from "/@/utils/request"

export function fetchList(query?: Object) {
  return request({
    url: '/train/xxrwTaskList/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj?: Object) {
  return request({
    url: '/train/xxrwTaskList',
    method: 'post',
    data: obj
  })
}

export function getObj(id?: string) {
  return request({
    url: '/train/xxrwTaskList/' + id,
    method: 'get'
  })
}

export function delObjs(ids?: Object) {
  return request({
    url: '/train/xxrwTaskList',
    method: 'delete',
    data: ids
  })
}

export function putObj(obj?: Object) {
  return request({
    url: '/train/xxrwTaskList',
    method: 'put',
    data: obj
  })
}
// 岗位进度排名
export function editList(taskId?: string) {
  return request({
    url: '/train/xxrwTaskList/getPostRankByTaskId/'+ taskId,
    method: 'get',
  })
};
// 个人进度排名
export function personList(taskId?: string) {
  return request({
    url: '/train/xxrwTaskRelateDate/queryStudyShedualRank?taskId='+ taskId,
    method: 'get',
  })
};
// 进度异常名单
export function abnormalList(taskId?: string) {
  return request({
    url: '/train/xxrwTaskList/getLearningAbnormalList?taskId='+ taskId,
    method: 'get',
  })
};
//下发通知
export function noticeList(obj?: Object) {
  return request({
    url: '/train/xxrwTaskList/sendProgressExceptionMsg',
    method: 'post',
    data: obj
  })
}
//学习时长
export function durationList(taskId?: string) {
  return request({
    url: '/train/xxrwTaskRelateDate/getLearningDurationByTask?taskId='+ taskId,
    method: 'post',
  })
}
// 学习任务考试成绩排名
export function rankingList(examId?: Object) {
  return request({
    url: '/train/xxrwTranscript/getTaskExamRankingByTask?examId='+examId,
    method: 'get',
  })
}
export function examinationList(obj?: Object) {
  return request({
    url: '/train/xxrwExamList',
    method: 'post',
    data: obj
  })
}
export function createTask(obj?: Object) {
  return request({
    url: '/train/xxrwTaskList',
    method: 'post',
    data: obj
  })
}
export function detailsList(id?: string) {
  return request({
    url: '/train/xxrwTaskList/'+ id,
    method: 'get',
  })
};
export function examdetailsList(examId?: string) {
  return request({
    url: '/train/xxrwExamList/getListForH5ById/'+ examId,
    method: 'get',
  })
};
//分数集合
export function score(examId?: string) {
  return request({
    url: '/train/xxrwScoreLevel/getList/' + examId,
    method: 'get'
  })
}
export function sededitList(obj?: Object) {
  return request({
    url: '/train/xxrwExamList',
    method: 'put',
    data: obj
  })
}

export function putObjsty(obj?: Object) {
  return request({
    url: '/train/xxrwTaskList',
    method: 'put',
    data: obj
  })
}

export function replace(examInfoId?: string) {
  return request({
    url: '/train/ksglExamInfo/delForXxrw?examInfoId=' + examInfoId,
    method: 'get'
  })
}
export function deleteList(examId?: string) {
  return request({
    url: '/train/xxrwExamList/updateExamPaper?examId=' + examId,
    method: 'put',
  })
}
// 学习关联考试标识
export function identification(obj?: Object) {
  return request({
    url: '/train/xxrwTaskList/updateTaskExam',
    method: 'put',
    data: obj
  })
}
// 校验
export function check(taskId?: string) {
  return request({
    url: '/train/xxrwTaskList/taskEditVerfication?taskId=' + taskId,
    method: 'get',
  })
}
// 证书名称
export function certificatename(query?: Object) {
  return request({
    url: '/train/zsglCertificateTemplate/getZsglCertificateList',
    method: 'get',
    params: query
  })
}



